<body>
<div class="path fn-clear"><span class="fb">首页</span><a href="###">应用管理</a></div>
<div class="button-nav">
  <a href="{url('appmanage/index')}" class="button button-blank button-link"> <i class="iconfont" title="应用管理">&#xF055;</i> 应用管理</a><a href="{url('appmanage/create')}" class="button button-blank"> <i class="iconfont" title="增加内容">&#xF023;</i> 创建应用</a> 
</div>
<div class="m5">
<div class="tipbox tipbox-warning">
    <div class="tipbox-icon"><i class="iconfont" title="警告">&#xF047;</i></div>
    <div class="tipbox-content">
        <h3 class="tipbox-title">友情提示：检测到更新安装包后会自动下载,请覆盖对应APPS目录。</h3>
    </div>
</div>
</div>
<div class="m5">
<table class="table table-bordered table-striped" width="100%">
<thead>
  <tr>
  <th class="fn-tac w120">应用ID</th>
  <th class="fn-tac">应用名称</th>
  <th class="fn-tac w60">版本</th>
  <th class="fn-tac w40">升级</th>
  <th class="fn-tac w80">开发者</th>
  <th class="fn-tac w120">管理操作</th>
  </tr>
</thead>
<tbody>
{loop $apps $app $config}
<tr>
  <td class="fn-tac">{$app}</td>
  <td>{$config['APP_NAME']}</td>
  <td class="fn-tac">{$config['APP_VER']}</td>
  <td class="fn-tac"><a tip="检查《{$app}》APP是否有最新版本。" href="###" url="{url('appmanage/update', array('app'=>$app,'var'=>$config['APP_VER']))}" class="get" title="检查更新"><i class="icon fn-f18 blue">&#xf021;</i></a></td>
  <td class="fn-tac">{$config['APP_AUTHOR']}</td>
  <td class="fn-tac">
  {if $config['APP_STATE'] == 1}
  <a href="{url('appmanage/export', array('app'=>$app))}" target="_self">导出</a> / <a href="###" class="get" url="{url('appmanage/uninstall', array('app'=>$app))}" tip="您确认卸载《{$app}》APP吗？"><span class="red">卸载</span></a> / <a href="{url('appmanage/state', array('app'=>$app,'state'=>2))}" target="_self"><span class="red">停用</span></a>
  {elseif $config['APP_STATE'] == 2}
    <a href="{url('appmanage/export', array('app'=>$app))}" target="_self">导出</a> / <a href="###" class="get" url="{url('appmanage/uninstall', array('app'=>$app))}" tip="您确认卸载《{$app}》APP吗？"><span class="red">卸载</span></a> / <a href="{url('appmanage/state', array('app'=>$app,'state'=>1))}" target="_self"><span class="green">启用</span></a>            
  {else}
    <a href="###" url="{url('appmanage/install', array('app'=>$app))}" class="get"><span class="green">安装</span></a>  
  {/if}
  </td>
</tr> 
{/loop} 
</tbody>  
</table>
</div>
<script type="text/javascript">
Do('base','Dialog',function(){
  $('.icon').click(function(){
    var css = this;
    $(this).html('<img src="__PUBLIC__/common/images/loading.gif" />');
    setTimeout(function(){
      $(css).html('<i class="icon fn-f18 blue">&#xf021;</i>');
    }, 8000);
    clearTimeout();
  });
  $('.get').click(function(){
    $(this).cpGet();
  });
})
</script>
</body>